VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "CPlatformSym"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Attribute VB_Ext_KEY = "SP3DEqpUSSClassType" ,"SYM"
Attribute VB_Ext_KEY = "SP3DV6UpgradeSO" ,"Upgraded by Eqp SO Upgrade Wizard at 11/29/2004-5:15:02 AM"
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'
'   Copyright (c) 2005, Intergraph Corporation. All rights reserved.
'
'   CPlatformSym.cls
'   ProgID:         SP3DPlatform.CPlatformSym
'   Author:         MS
'   Creation Date:  Friday, 2 May 2003
'   Description:
'   The symbol is prepared based on Platform.PlatformServices
'   The symbol consists of 9 outputs. The following reference outputs are exposed.
'   (1) Platform lines & arcs on the top, (2) Top surface of the Platform (3) Bottom surface of the Platform (4) Default Surface
'   (6) Point on tower centerline
'
'   Change History:
'   dd.mmm.yyyy     who                     change description
'   -----------     ---                     ------------------
'   09.Jul.2003     SymbolTeam(India)       Copyright Information, Header  is added/Updated.
'   23.Aug.2003     SymbolTeam(India)       Updated Error Handling Code
'   29.Nov.2004     V6UpgradeSO             Made compatible with Smart Occurrence based Equipments
'   11.Jul.2006      kkc                    DI 95670-Replaced names with initials in the revision history.
'   10.12.2007      PS                      CR-132021  Modified the default value of PlatformAngle
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Option Explicit

Private Const MODULE = "CPlatformSym:"  'Used for error messages

Private m_oSymbolHelper As IJSymbolHelper
    
' Declaration of the User Symbol Services interface
Implements IJDUserSymbolServices

Private Sub Class_Initialize()
    
    Const METHOD = "Class_Initialize:"
    On Error GoTo ErrorHandler
    
    Set m_oSymbolHelper = New SymbolServices
    m_oSymbolHelper.ProjectName = "SP3DPlatformAsm"
    m_oSymbolHelper.ClassName = "CPlatformSym"
    
' Inputs
    m_oSymbolHelper.NumInputs = 6
    m_oSymbolHelper.AddInputDef 1, "VesselDiameter", "Vessel Diameter", 1.219
    m_oSymbolHelper.AddInputDef 2, "PlatformWidth", "Platform Width", 0.2
    m_oSymbolHelper.AddInputDef 3, "PlatformHeight", "Platform Height or Thickness", 0.254
    m_oSymbolHelper.AddInputDef 4, "PlatformAngle", "Platform Total Angle", 4 * Atn(1)
    m_oSymbolHelper.AddInputDef 5, "ClearancefromVessel", "Clearance between Vessel and the Platform", 0.02
    m_oSymbolHelper.AddInputDef 6, "InsulationThickness", "Insulation Thickness for the Vessel", 0.0254
        
' Outputs
    m_oSymbolHelper.NumOutputs = 9
    m_oSymbolHelper.AddOutputDef 1, "PlatformBody", "Body of the Platform", SimplePhysical
    m_oSymbolHelper.AddOutputDef 2, "DefaultSurface", "Default Surface Reference plane on Tower", ReferenceGeometry
    m_oSymbolHelper.AddOutputDef 3, "TowerPoint", "Point on Tower", ReferenceGeometry
    m_oSymbolHelper.AddOutputDef 4, "TopLine1", "Top line1 of the Platform", ReferenceGeometry
    m_oSymbolHelper.AddOutputDef 5, "TopArc2", "Top Arc2 of the Platform", ReferenceGeometry
    m_oSymbolHelper.AddOutputDef 6, "TopLine2", "Top Line2 of the Platform", ReferenceGeometry
    m_oSymbolHelper.AddOutputDef 7, "TopArc1", "Top Arc1 of the Platform", ReferenceGeometry
    m_oSymbolHelper.AddOutputDef 8, "TopSurface", "Top Surface of the Platform", ReferenceGeometry
    m_oSymbolHelper.AddOutputDef 9, "BottomSurface", "Bottom Surface of the Platform", ReferenceGeometry
    
' Aspects
    m_oSymbolHelper.NumAspects = 2
    m_oSymbolHelper.AddAspectDef 1, "SimplePhysical", "Physical", SimplePhysical
    m_oSymbolHelper.AddAspectDef 2, "ReferenceGeometry", "ReferenceGeometry", ReferenceGeometry
    
    Exit Sub
    
ErrorHandler:
    Err.Raise Err.Number, Err.Source & " " & METHOD, Err.Description, _
    Err.HelpFile, Err.HelpContext

End Sub

Private Sub Class_Terminate()
    Set m_oSymbolHelper = Nothing
End Sub

' note that the rest of the code is generated by the Symbol Wizard and should not need to be modified
Public Function IJDUserSymbolServices_InstanciateDefinition( _
                ByVal CodeBase As String, _
                ByVal defParameters As Variant, _
                ByVal ActiveConnection As Object) As Object
    ' call symbol services default implementation of this method
    Const METHOD = "IJDUserSymbolServices_InstanciateDefinition:"
On Error GoTo Errx
    Set IJDUserSymbolServices_InstanciateDefinition = m_oSymbolHelper.InstanciateDefinition(CodeBase, defParameters, ActiveConnection)
    
    Exit Function

Errx:
    Err.Raise Err.Number, Err.Source & " " & METHOD, Err.Description, _
    Err.HelpFile, Err.HelpContext
End Function

Public Function IJDUserSymbolServices_GetDefinitionName(ByVal definitionParameters As Variant) As String
Const METHOD = "IJDUserSymbolServices_GetDefinitionName:"
  On Error GoTo Errx
      IJDUserSymbolServices_GetDefinitionName = m_oSymbolHelper.ProjectName + "." + m_oSymbolHelper.ClassName
    
    Exit Function

Errx:
    Err.Raise Err.Number, Err.Source & " " & METHOD, Err.Description, _
    Err.HelpFile, Err.HelpContext
End Function

Public Sub IJDUserSymbolServices_InitializeSymbolDefinition(ByRef pSymbolDefinition As IJDSymbolDefinition)
Const METHOD = "IJDUserSymbolServices_InitializeSymbolDefinition:"
On Error GoTo Errx
    m_oSymbolHelper.InitializeSymbolDefinition pSymbolDefinition
Exit Sub

Errx:
    Err.Raise Err.Number, Err.Source & " " & METHOD, Err.Description, _
    Err.HelpFile, Err.HelpContext
      
End Sub

Public Sub IJDUserSymbolServices_InvokeRepresentation(ByVal sblOcc As Object, _
                    ByVal repName As String, _
                    ByVal outputcoll As Object, _
                    ByRef arrayOfInputs())
Const METHOD = "IJDUserSymbolServices_InvokeRepresentation:"
On Error GoTo Errx
    m_oSymbolHelper.InvokeRepresentation sblOcc, repName, outputcoll, arrayOfInputs
        
Exit Sub

Errx:
    Err.Raise Err.Number, Err.Source & " " & METHOD, Err.Description, _
            Err.HelpFile, Err.HelpContext
End Sub

Public Function IJDUserSymbolServices_EditOccurence(ByRef pSymbolOccurence As Object, ByVal transactionMgr As Object) As Boolean
Const METHOD = "IJDUserSymbolServices_EditOccurence:"
On Error GoTo Errx
    ' The definition uses the generic EditOccurrence command
    IJDUserSymbolServices_EditOccurence = False
        Exit Function

Errx:
    Err.Raise Err.Number, Err.Source & " " & METHOD, Err.Description, _
            Err.HelpFile, Err.HelpContext

End Function




